﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DreamIn.Structures.ServerDatabase.Entities;
using DreamIn.Structures.ServerDatabase.DataAccessLayer;

namespace DreamIn.Structures.ServerDatabase.BusinessLogic
{
    class UserBL
    {
        internal List<UserEntity> GetUsers()
        {
            UserDAL userDAL = new UserDAL();
            return userDAL.GetUsers();
        }
        internal UserEntity GetUser(String username)
        {
            UserDAL userDAL = new UserDAL();
            return userDAL.GetUser(username);
        }
        internal void AddUser(String username, String password, String country)
        {
            UserDAL userDAL = new UserDAL();
            userDAL.AddUser(username, password, country);
        }
        internal void DeleteUser(UserEntity user)
        {
            UserDAL userDAL = new UserDAL();
            userDAL.DeleteUser(user);
        }
        internal void UpdateUser(int id_user,String username, String password, String country)
        {
            UserDAL userDAL = new UserDAL();
            userDAL.UpdateUser(id_user,username, password, country);
        }
    }
}
